<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body style="font-family:Arial, Helvetica, sans-serif">

<?php if($this->show != "yes"){ ?>
<h1>Setup your login password</h1>

<form id="form1" name="form1" method="post" action="">
  <table width="500" border="0" cellspacing="0" cellpadding="10" align="center">
    <tr>
      <td colspan="2" bgcolor="#D6FEE6">Welcome, please input your name and date of birth to proof your identity</td>
    </tr>
    <tr>
      <td>Formal First Name<br />
      (Space WIll be Omit)</td>
      <td><input name="first_name" type="text" id="first_name" size="50" /></td>
    </tr>
    <tr>
      <td>Formal Last Name</td>
      <td><input name="last_name" type="text" id="last_name" size="50" /></td>
    </tr>
    <tr>
      <td>Date of Birth</td>
      <td><select name="day" id="day">
          <option value="01">01</option>
          <option value="02">02</option>
          <option value="03">03</option>
          <option value="04">04</option>
          <option value="05">05</option>
          <option value="06">06</option>
          <option value="07">07</option>
          <option value="08">08</option>
          <option value="09">09</option>
          <option value="10">10</option>
          <option value="11">11</option>
          <option value="12">12</option>
          <option value="13">13</option>
          <option value="14">14</option>
          <option value="15">15</option>
          <option value="16">16</option>
          <option value="17">17</option>
          <option value="18">18</option>
          <option value="19">19</option>
          <option value="20">20</option>
          <option value="21">21</option>
          <option value="22">22</option>
          <option value="23">23</option>
          <option value="24">24</option>
          <option value="25">25</option>
          <option value="26">26</option>
          <option value="27">27</option>
          <option value="28">28</option>
          <option value="29">29</option>
          <option value="30">30</option>
          <option value="31">31</option>
        </select>
        /
        <select name="month" id="month">
          <option value="01">Jan.</option>
          <option value="02">Feb.</option>
          <option value="03">Mar.</option>
          <option value="04">Apr.</option>
          <option value="05">May</option>
          <option value="06">June</option>
          <option value="07">July</option>
          <option value="08">Aug.</option>
          <option value="09">Sept.</option>
          <option value="10">Oct.</option>
          <option value="11">Nov.</option>
          <option value="12">Dec.</option>
        </select>
        /        
        <label for="year"></label>
        <input type="text" name="year" id="year" /></td>
    </tr>
    <tr>
      <td colspan="2" align="center"><input type="submit" name="btn_setup_password" id="btn_setup_password" value="SAVE" />
      <br />
      <br />
     <?php echo $this->message;?>
     </td>
    </tr>
  </table>
  <br />
<br />
<br />
  <br />
</form>
<?php }
if($this->show == "yes"){
	
echo "<h1>All Staff List (Active/Non-Active)</h1>";	
}
?>
<table width="520" border="1" cellspacing="0" cellpadding="10">
  <tr>
  	<td>ID</td>
    <td width="200"> Name</td>
    <td>DOB</td>
    <td>Password Setup</td>
    <td>Prefer Name</td>
    <td>Mobile No.</td>
    <td>Register Date</td>
  </tr>
<?php
$staffInfo = new Model_DbTable_Roster_Staffinfo();
if($this->show == "yes"){
foreach($this->sList as $k => $v){
?>  
  <tr>
  	<td><?php  echo $v["id"]?></td>
    <td><?php  echo Model_EncryptHelper::getSslPassword($v["n"])?></td>
    <td><?php  
			date_default_timezone_set('Australia/Melbourne');	
	echo date("Y-m-d",Model_EncryptHelper::getSslPassword($v["d"]))?></td>
    <td><?php  
	if(strlen($v["p"])<2){
		echo "NO";
		}
	
	?></td>
    <td><?php  echo $v["ni"]?></td>
    <?php $staffDetail = $staffInfo->getStaffinfo($v['id']);?>
    <td width="100%"><?php echo $staffDetail['mobile_staff'];?></td>
    <td width="100%"><?php echo $staffDetail['register_date'];?></td>
  </tr>
<?php }
}
?>
</table>


</body>
</html>
